package com.guigu.service.impl.design;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.design.DProductUseMapper;
import com.guigu.pojo.design.DFile;
import com.guigu.pojo.design.DProductUse;
import com.guigu.service.design.DProductUseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr.Zhang
 * @since 2024-12-18
 */
@Service
public class DProductUseServiceImpl extends ServiceImpl<DProductUseMapper, DProductUse> implements DProductUseService {

    @Autowired
    private DProductUseMapper dProductUseMapper;

    @Override
    public ArrayList<DProductUse> selectAllUse() {
        ArrayList<DProductUse> dProductUses = (ArrayList<DProductUse>) dProductUseMapper.selectList(null);
        return dProductUses;
    }

    @Override
    public DProductUse selectByFileId(DFile dFile) {
        DProductUse dProductUse = dProductUseMapper.selectById(dFile.getType());
        return dProductUse;
    }
}
